package com.aicheyoudao;

import android.app.ProgressDialog;
import android.content.Context;

public class MyLoadingDialog extends ProgressDialog {
	public static MyLoadingDialog dialog;

	private MyLoadingDialog(Context context) {
		super(context);
		this.setProgress(ProgressDialog.STYLE_SPINNER);
		this.setCancelable(true);
		this.setCanceledOnTouchOutside(false);

	}

	public static void StartShowProgressDialog(Context context) {
		if (dialog == null || !dialog.isShowing()) {
			dialog = new MyLoadingDialog(context);
			dialog.show();
		}

	}

	public static void stopDialog() {
		if (dialog != null)
			dialog.dismiss();
	}

}
